package com.frabo.watchadoin;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

/**
 * Created with IntelliJ IDEA.
 * User: Francis
 * Date: 13-07-31
 * Time: 19:40
 */
public class DoingActivity extends Activity
{
	private WatchaDoinApplication app;
	private TextView doingNameTextView;
	private ViewGroup rootLayout;

	/**
	 * Called when the activity is first created.
	 */
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.doing);

		app = WatchaDoinApplication.getInstance();

		// Get activity components
		rootLayout = (ViewGroup) findViewById(R.id.doing_activity_root_layout);
		doingNameTextView = (TextView) findViewById(R.id.doing_text_view);

		// Set font
		app.setFont(rootLayout, app.avenirFont);

		if (app.currentDoing != null) {
			// Set the name of the current task
			doingNameTextView.setText(app.currentDoing.getName());
		}
		else {
			// Something is wrong, finish view..
		}
	}

}